  <?php 
  	
  	$mdlNewsItem=new Zendme_Models_NewsItem();
	$itemNews=$mdlNewsItem->listItem(array('slug'=>'tin-tuc-tu-van'),array('task'=>'public-category'));
		
	$mdlPage=new Zendme_Models_Pages();
	$itemPages=$mdlPage->listItem(null,array('task'=>'public-home'));	
	
	$mdlContact= new Zendme_Models_Contact();
	$itemContact= $mdlContact->getItem();
				
  ?>
  <!--------------------FOOTER (Start) ---------------------->
        <div class="footer mar-top-30">
        	<div class="frame-footer">
            	<div class="col-footer width-42 cols0">
                	<div class="cnt-col-footer">
                    	<div class="title-footer">TIN TỨC TƯ VẤN</div>
                        <ul>
                   			<?php 
                   			$cut=new Zendme_CutString();
                   			foreach ($itemNews as $item){
                   			$name=$item['name'];
                   			$name=$cut->cutTring(100, $name);	
                   			$slug=$item['slug'];
                   			?>
                            <li><a href="<?php echo DOMAIN_URL."/tin-tuc/$slug.html" ?>"><?php echo $name ?></a></li>
                        	<?php } ?>
                        </ul>
                        <div class="title-footer2">ĐĂNG KÝ TƯ VẤN</div>
                        <div class="search">
                            <input type="keyword" class="keyword" id="email" />
                            <input id="register" type="submit" class="btn-keyword" value="" />
                        </div>
                        <script type="text/javascript">
                        	$("#register").click(function()
                        	{
                       		 	var reg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
                  		   		var email = $("#email").val();
		                  		if(reg.test(email) == false) 
			                  	{		                  		 
		                  		      alert('Địa chỉ email không hợp lệ');
		                  		      return false;
		                  		}
		                  		                  		
		                  		alert("Đăng kí tư vấn thành công !");
                      		});
                        
                        </script>
                    </div>
                </div>
                
                <div class="col-footer width-20 cols1">
                	<div class="cnt-col-footer">
                    	<div class="title-footer">VỀ CHÚNG TÔI</div>
                        <ul>
                        	<?php 
                        	foreach ($itemPages as $item){
							$name=$item['name'];
							$slug=$item['slug'];
                        	?>
                            <li><a href="<?php echo DOMAIN_URL."/$slug.html" ?>"><?php echo $name ?></a></li>
                            <?php } ?>
                        </ul>
                    </div>
                </div>
                <div class="col-footer width-30 cols2">
                	<div class="cnt-col-footer">
                		<?php 
                		$name=$itemContact['name'];
                		$address=$itemContact['address'];
                		$phone=$itemContact['phone'];
                		$email=$itemContact['email'];
                		$fb=$itemContact['facebook'];
                		$google=$itemContact['google'];
                		$twitter=$itemContact['twitter'];
                		?>
                    	<div class="title-footer">THÔNG TIN LIÊN HỆ</div>
                        <strong><p><?php echo $name ?></p></strong>
                        <p><?php echo $address ?></p>
                        <p><?php echo $phone ?></p>
                        <p><?php echo $email ?></p>
                        
                        <div class="link-connect">
                            <a class="link" href="<?php echo $fb ?>"><span class="face"></span></a>
                            <a class="link" href="<?php echo $google ?>"><span class="twet"></span></a>
                            <a class="link" href="<?php echo $twitter ?>"><span class="goog"></span></a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <!--------------------FOOTER (End) ------------------------>
    </div>
</body>
</html>
